﻿using Sidvall.AuthorizationManager.Web.Host.Models;
using Sidvall.Web.Security;
using System.Web.Mvc;

namespace Sidvall.AuthorizationManager.Web.Host.Controllers
{
	public class HomeController : Controller
	{
		#region Public Members

		#region Index

		[HttpGet]
		[Route("")]
		[Route("Index")]
		public ActionResult Index()
		{
			return View();
		}

		#endregion
		#region About

		[HttpGet]
		[Route("About")]
		public ActionResult About()
		{
			ViewBag.Message = "Your application description page.";

			return View();
		}

		#endregion
		#region Contact

		[AuthenticationMethodAuthorize]
		[HttpGet]
		[Route("Contact")]
		public ActionResult Contact()
		{
			ViewBag.Message = "Your contact page.";

			return View();
		}

		#endregion
		#region InvalidUser

		[HttpGet]
		[Route("InvalidUser")]
		public ActionResult InvalidUser()
		{
			return InvalidUser(Sidvall.Security.UserStatus.InvalidUser);
		}
		[HttpGet]
		[Route("InvalidUser/{userStatus}")]
		public ActionResult InvalidUser(Sidvall.Security.UserStatus userStatus)
		{
			var model = new InvalidUserModel()
			{
				UserStatus = userStatus,
			};
			return View(model);
		}

		#endregion

		#endregion
	}
}